//package cn.lingyangwl.agile.auth.listener;
//
//import cn.lingyangwl.agile.dynamic.client.event.DynamicConfigEvent;
//import cn.lingyangwl.agile.dynamic.client.wx.WxMpWrapClient;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import me.chanjar.weixin.common.api.WxConsts;
//import me.chanjar.weixin.mp.api.WxMpMessageRouter;
//import org.springframework.context.event.EventListener;
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//
///**
// * @author shenguangyang
// */
//@Slf4j
//@Component
//@RequiredArgsConstructor
//public class DynamicConfigEventListener {
//	private final AuthScanHandler scanHandler;
//	@Order
//	@EventListener(DynamicConfigEvent.class)
//	public void dynamicClient(DynamicConfigEvent event) {
//		Object source = event.getSource();
//		if (source instanceof WxMpWrapClient) {
//			WxMpWrapClient client = (WxMpWrapClient) source;
//			WxMpMessageRouter router = client.getRouter();
//			// 扫码事件
//			router.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
//					.event(WxConsts.EventType.SCAN).handler(scanHandler).end();
//		}
//	}
//}
